<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
  <th:block th:include="include :: header('修改客户评价')"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
  <form class="form-horizontal m" id="form-projectCustomerEval-edit" th:object="${projectCustomerEval}">
    <input id="evalId" name="evalId" th:field="*{evalId}" type="hidden">
    <input id="projectId" name="projectId" th:field="*{evalId}" type="hidden">
    <div class="row">
      <div class="col-sm-6">
        <div class="form-group">
          <label class="col-sm-4 control-label"><span style="color: red; ">*</span>项目评分：</label>
          <div class="col-sm-8">
            <select name="projectRating" class="form-control m-b" th:with="type=${@dict.getType('rating_level')}" required>
              <option value="">--请选择--</option>
              <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{projectRating}"></option>
            </select>
          </div>
        </div>
      </div>
      <div class="col-sm-6">
        <div class="form-group">
          <label class="col-sm-3 control-label"><span style="color: red; ">*</span>速度评分：</label>
          <div class="col-sm-8">
            <select name="speedRating" class="form-control m-b" th:with="type=${@dict.getType('rating_level')}" required>
              <option value="">--请选择--</option>
              <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{speedRating}"></option>
            </select>
          </div>
        </div>
      </div>
    </div>
    <div class="row">
      <div class="col-sm-6">
        <div class="form-group">
          <label class="col-sm-4 control-label"><span style="color: red; ">*</span>效果评分：</label>
          <div class="col-sm-8">
            <select name="resultRating" class="form-control m-b" th:with="type=${@dict.getType('rating_level')}" required>
              <option value="">--请选择--</option>
              <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{resultRating}"></option>
            </select>
          </div>
        </div>
      </div>
      <div class="col-sm-6">
        <div class="form-group">
          <label class="col-sm-3 control-label"><span style="color: red; ">*</span>销售评分：</label>
          <div class="col-sm-8">
            <select name="saleRating" class="form-control m-b" th:with="type=${@dict.getType('rating_level')}" required>
              <option value="">--请选择--</option>
              <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{saleRating}"></option>
            </select>
          </div>
        </div>
      </div>
    </div>
    <div class="row">
      <div class="col-sm-6">
        <div class="form-group">
          <label class="col-sm-4 control-label"><span style="color: red; ">*</span>技术支持评分：</label>
          <div class="col-sm-8">
            <select name="techRating" class="form-control m-b" th:with="type=${@dict.getType('rating_level')}" required>
              <option value="">--请选择--</option>
              <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{techRating}"></option>
            </select>
          </div>
        </div>
      </div>
      <div class="col-sm-6">
        <div class="form-group">
          <label class="col-sm-3 control-label"><span style="color: red; ">*</span>诊断评分：</label>
          <div class="col-sm-8">
            <select name="diagRating" class="form-control m-b" th:with="type=${@dict.getType('rating_level')}" required>
              <option value="">--请选择--</option>
              <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{diagRating}"></option>
            </select>
          </div>
        </div>
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-2 control-label">项目评价：</label>
      <div class="col-sm-9">
        <textarea name="projectEval" maxlength="200" class="form-control" rows="3">[[*{projectEval}]]</textarea>
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-2 control-label">销售评价：</label>
      <div class="col-sm-9">
        <textarea name="saleEval" maxlength="200" class="form-control" rows="3">[[*{saleEval}]]</textarea>
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-2 control-label">技术支持评价：</label>
      <div class="col-sm-9">
        <textarea name="techEval" maxlength="200" class="form-control" rows="3">[[*{techEval}]]</textarea>
      </div>
    </div>
    <div class="row">
      <div class="col-sm-offset-5 col-sm-10">
        <button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-check"></i>保 存</button>&nbsp;
        <button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭 </button>
      </div>
    </div>
  </form>
</div>
<div th:include="include::footer"></div>
<script type="text/javascript">
  var prefix = ctx + "project/projectCustomerEval";
  $("#form-projectCustomerEval-edit").validate({
    focusCleanup: true
  });

  function submitHandler() {
    if ($.validate.form()) {
      $.operate.saveTab(prefix + "/edit", $('#form-projectCustomerEval-edit').serialize());
    }
  }
</script>
</body>
</html>
